import i18n from '@/locales';

const portalClientColumns = [
  {
    title: i18n.t('common.onlineStatus'),
    dataIndex: 'onlineStatus',
    scopedSlots: { customRender: 'onlineStatus' },
    filters: [
      {
        text: i18n.t('common.all'),
        value: '',
      },
      {
        text: i18n.t('common.online'),
        value: '1',
      },
      {
        text: i18n.t('common.offline'),
        value: '0',
      },
    ],
    filterMultiple: false,
  },
  {
    title: i18n.t('portalAuth.account'),
    dataIndex: 'account',
  },
  {
    title: i18n.t('common.ip'),
    dataIndex: 'userIp',
    width: 140,
  },
  {
    title: i18n.t('portalUser.mac'),
    dataIndex: 'userMac',
    width: 160,
  },
  {
    title: i18n.t('localAccount.authType'),
    dataIndex: 'authType',
    scopedSlots: {
      customRender: 'authMethod',
    },
    // filters: this.authTypes,
    // filterMultiple: false,
  },
  {
    title: i18n.t('portalUser.firstOnline'),
    dataIndex: 'loginTime',
    scopedSlots: { customRender: 'timeColumn' },
  },
  {
    title: i18n.t('portalUser.lastOnline'),
    dataIndex: 'lastOnlineTime',
    scopedSlots: { customRender: 'timeColumn' },
  },
  {
    title: i18n.t('authLog.devMac'),
    dataIndex: 'deviceMac',
    scopedSlots: { customRender: 'deviceInfo' },
  },
  {
    title: i18n.t('authLog.devGroup'),
    dataIndex: 'loginArea',
    scopedSlots: { customRender: 'deviceGroup' },
  },
  {
    title: i18n.t('authDevice.devSn'),
    dataIndex: 'deviceSn',
  },
  {
    title: i18n.t('authLog.devIp'),
    dataIndex: 'nasIpAddress',
    scopedSlots: { customRender: 'deviceInfo' },
  },
  {
    title: i18n.t('common.email'),
    dataIndex: 'userName',
    showColums: false,
  },
  {
    title: i18n.t('userManage.phone'),
    dataIndex: 'tel',
    showColums: false,
  },
  {
    title: i18n.t('common.action'),
    width: 80,
    align: 'center',
    dataIndex: 'action',
    fixed: 'right',
    scopedSlots: {
      customRender: 'action',
    },
  },
];
export { portalClientColumns };
